# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mock
_pkgname=${pkgname#python-}
pkgver=3.0.5
pkgrel=15
pkgdesc='Mocking and Patching Library for Testing.'
url='https://github.com/testing-cabal/mock/'
arch=('any')
license=('BSD')
depends=('python' 'python-six' 'python-pbr')
makedepends=('python-setuptools')
source=("https://github.com/testing-cabal/mock/archive/$pkgver.tar.gz")
sha512sums=('9ab4f0c794f5701ba1367d982cf79a5662d4233753d12ed9c88ae20282db1f44be73f84c4d9f6d03ff64926b8c1b6d0c9a79b2a4724a3eb36c247ffd4ab03e2d')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

